package hu.elte.tudaskezelo.dbpedialike.views.overlay;

import hu.elte.tudaskezelo.dbpedialike.R;

import org.osmdroid.util.GeoPoint;
import org.osmdroid.views.overlay.OverlayItem;

import android.content.Context;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;

public class OwnOverlayItem extends OverlayItem {

	public OwnOverlayItem(Context context, String type, String aUid,
			String aTitle, String aDescription, GeoPoint aGeoPoint) {
		super(aUid, aTitle, aDescription, aGeoPoint);

		Drawable drawable = null;
		
		Resources resources = context.getResources();
		if ("education".equals(type)){
			drawable = resources.getDrawable(R.drawable.education);
		}else
		if ("arts".equals(type)){
			drawable = resources.getDrawable(R.drawable.arts);
		}else
		if ("gate".equals(type)){
			drawable = resources.getDrawable(R.drawable.gate);
		}else
		if ("church".equals(type)){
			drawable = resources.getDrawable(R.drawable.church);
		}else
		if ("forest".equals(type)){
			drawable = resources.getDrawable(R.drawable.forest);
		}else
		if ("hospital".equals(type)){
			drawable = resources.getDrawable(R.drawable.hospital);
		}else
		if ("bed".equals(type)){
			drawable = resources.getDrawable(R.drawable.bed);
		}else
		if ("music".equals(type)){
			drawable = resources.getDrawable(R.drawable.music);
		}else
		if ("sightseeing".equals(type)){
			drawable = resources.getDrawable(R.drawable.sightseeing);
		}else
		if ("subway".equals(type)){
			drawable = resources.getDrawable(R.drawable.subway);
		}else
		if ("transparent".equals(type)){
			drawable = resources.getDrawable(R.drawable.transparent);
		}
		if (drawable != null) {
			drawable.setBounds(0, 0, drawable.getIntrinsicWidth(),
					drawable.getIntrinsicHeight());
			setMarker(drawable);
		}
	}

}
